package com.xm.po;

import com.fasterxml.jackson.annotation.JsonFormat;

import java.util.Date;
/**
 * @author xie'lin'feng
 * @date 2020-08-06-14:35
 * @description 收藏实体类
 */
public class Favorites{
	//属性
	private Integer favoriteId;
	//用户id
	private Integer userId;
	//商品id
	private Integer goodsId;
	//创建时间
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private Date createTime;
	//构造器
	public Favorites(){}
	public Favorites(Integer userId){
		this.userId = userId;
	}
	public Favorites(Integer favoriteId,Integer userId,Integer goodsId,Date createTime){
		this.favoriteId=favoriteId;
		this.userId=userId;
		this.goodsId=goodsId;
		this.createTime=createTime;
}
	//getter setter方法
	public void setFavoriteId(Integer favoriteId){
		this.favoriteId=favoriteId;
	}
	public Integer getFavoriteId(){
		return favoriteId;
	}
	public void setUserId(Integer userId){
		this.userId=userId;
	}
	public Integer getUserId(){
		return userId;
	}
	public void setGoodsId(Integer goodsId){
		this.goodsId=goodsId;
	}
	public Integer getGoodsId(){
		return goodsId;
	}
	public void setCreateTime(Date createTime){
		this.createTime=createTime;
	}
	public Date getCreateTime(){
		return createTime;
	}
	public String toString(){
		return "Favorites [favoriteId=" + favoriteId + ", userId=" + userId + ", goodsId=" + goodsId + ", createTime=" + createTime + "]";
	}
}

